package cn.jit.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
	/**
	 * 如果mail.properties在classpath下，可以传参给name这样的值： /mail.properties 
	 * @param name
	 * @return
	 * @throws IOException 
	 */
	public static Properties loadProperties(String name) throws IOException {
		InputStream is = PropertiesUtil.class.getResourceAsStream(name);
		Properties properties = new Properties();
        properties.load(is);
        return properties;
	}
}
